package com.neusoft.neuiotms.micro.dcam;

import java.util.Map;

import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;

import com.neusoft.bizcore.web.dto.result.ResultDTO;
import com.neusoft.bizcore.web.dto.result.ResultListDTO;

import feign.QueryMap;

public interface DcamMicroService {

    @RequestMapping(method = RequestMethod.GET, value = "/api/w/asset/assets")
    ResultListDTO<Map<String, Object>> AssetByCodes(final Map<String, String[]> assetCodes);

    @RequestMapping(method = RequestMethod.GET, value = "/api/w/asset/stocks")
    ResultListDTO<Map<String, Object>> StocksByIds(final Map<String, Long[]> stockIds);

    @RequestMapping(method = RequestMethod.PUT, value = "/api/w/stock/{id}/{num}", consumes = "application/json")
    ResultDTO<Map<String, Object>> updateStockNum(@PathVariable Long id, @PathVariable int num);

    @RequestMapping(method = RequestMethod.GET, value = "/api/w/fixedAsset")
    ResultListDTO<Map<String, Object>> searchAssets(final @QueryMap Map<String, Object> queryMap);

    @RequestMapping(method = RequestMethod.GET, value = "/api/w/fixedAsset/count")
    ResultDTO<Long> searchAssetsCount(final @QueryMap Map<String, Object> queryMap);

    @RequestMapping(method = RequestMethod.GET, value = "/api/w/spareconsume/liststock/{workNum}/finish")
    ResultListDTO<Map<String, Object>> searchFinishStockListByWorknum(@PathVariable String workNum);

    @RequestMapping(method = RequestMethod.GET, value = "/api/w/spareconsume/liststock/{workNum}/finish/{confirmUser}")
    ResultListDTO<Map<String, Object>> searchFinishStockListByWorknumAndConfirmUser(@PathVariable String workNum,
            @PathVariable String confirmUser);

    @PutMapping(value = "/api/w/fixedAsset/update/runningstatus", consumes = "application/json")
    ResultDTO<Boolean> updateAssetRunningStatus(boolean status, Long[] idArray);
}
